package com.liang.springcloud.service;

import com.liang.springcloud.entities.Payment;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.PathVariable;

public interface PaymentService {

    int create(Payment payment);
    Payment getPaymentById(@Param("id") Long id);

    /**
     * hystrix降级
     * @param id
     * @return
     */
    String payment_ok(Integer id);
    String payment_timeOut(Integer id);

    /**
     * 服务熔断
     * @param id
     * @return
     */
    String paymentCircuitBreaker(@PathVariable("id") Integer id);

}
